//
// CLetterColors.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;

public class CLetterColors {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CLetterColors(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CLetterColors obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CLetterColors(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CLetterColors() {
    this(nel3dJNI.new_CLetterColors(), true);
  }

  public void clear() {
    nel3dJNI.CLetterColors_clear(swigCPtr, this);
  }

  public boolean empty() {
    return nel3dJNI.CLetterColors_empty(swigCPtr, this);
  }

  public long size() {
    return nel3dJNI.CLetterColors_size(swigCPtr, this);
  }

  public long getIndex(long i) {
    return nel3dJNI.CLetterColors_getIndex(swigCPtr, this, i);
  }

  public CRGBA getColor(long i) {
    return new CRGBA(nel3dJNI.CLetterColors_getColor(swigCPtr, this, i), false);
  }

  public SWIGTYPE_p_NL3D__CLetterColors__SLetterColor getLetterColor(long i) {
    return new SWIGTYPE_p_NL3D__CLetterColors__SLetterColor(nel3dJNI.CLetterColors_getLetterColor(swigCPtr, this, i), false);
  }

  public boolean isSameLetterColors(ULetterColors letterColors) {
    return nel3dJNI.CLetterColors_isSameLetterColors(swigCPtr, this, ULetterColors.getCPtr(letterColors), letterColors);
  }

  public void pushLetterColor(long index, CRGBA color) {
    nel3dJNI.CLetterColors_pushLetterColor(swigCPtr, this, index, CRGBA.getCPtr(color), color);
  }

}
